<?php
namespace app\work\validate;
use think\Validate;

/**
 * 工作记录推广工作信息验证器
 * Created by PhpStorm.
 * User: tyll
 * Date: 2019/10/30
 * Time: 15:32
 */
class WorkRecordExtend extends Validate{

    protected $rule = [
        'name'        => 'require',
        'content'     => 'require',
        'pic'         => 'require',
    ];

    protected $message = [
        'name.require'          => '名称必须填写',
        'content.require'       => '内容必须填写',
        'pic.require'           => '图片必须填写',
    ];

    protected $scene = [
        'add'  => ['name','content'],
        'edit' => ['name','content']
    ];
}